import { ParamsPage, ResponsePage } from '@/api/common/type';

//  <-------- 班制列表
export type ClassSystemParams = ParamsPage;

export interface ClassSystemResponse extends ResponsePage {
    records: ClassSystem[];
}
export interface ClassSystem {
    id: number;
    workTime: string;
    unEditable: boolean;
    equipmentCollection: EquipmentCollection[];
}
export interface EquipmentCollection {
    id: number;
    deviceName: string;
    deviceCode: string;
    selected: boolean;
    bound: boolean;
}

export interface EquipmentResponse extends ResponsePage {
    records: EquipmentCollection[];
}
// 班制列表 -------->

// <-------- 详细班制信息
export interface ClassSystemDetail {
    id: number;
    workingDayPeriods: WorkingDayPeriods[];
}

export interface WorkingDayPeriods {
    workingDay: number;
    periodId: number;
    periodDesc?: string;
}
// 详细班制信息  -------->

// 修改或更新Data
export interface UpdateClassSystemData {
    id?: number;
    workingDayPeriods: {
        workingDay: number;
        periodId: number;
        periodDesc?: string | undefined;
    }[];
    equipmentIds: number[];
}
